Skip to content

Feature: Migrate profile to simplechildwindow #3087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 23, 2025
Merged

Conversation

BornToBeRoot
Copy link
Owner

@BornToBeRoot BornToBeRoot commented Jun 18, 2025

Changes proposed in this pull request

  • Migrate profiles / groups to simple child window

Related issue(s)

To-Do

Contributing

By submitting this pull request, I confirm the following:

@BornToBeRoot BornToBeRoot changed the title Feature: Migrate profile/group to simplechildwindow Feature: Migrate profile to simplechildwindow Jun 23, 2025
@BornToBeRoot
Copy link
Owner Author

This pull request introduces several updates to the NETworkManager project, focusing on UI enhancements, code refactoring, and improved validation logic. The most significant changes include transitioning from MetroDialog to ChildWindow for dialog management, refining color schemes and styles for consistency, and enhancing validation for profile names. Below is a breakdown of the key changes grouped by theme:

Dialog Management Refactor:

  • Replaced MetroDialog with ChildWindow for profile-related dialogs, improving the user experience and simplifying dialog handling. This includes updates to methods like ShowAddProfileDialog, ShowEditProfileDialog, ShowCopyAsProfileDialog, and ShowDeleteProfileDialog in ProfileDialogManager. [1] [2]
  • Added OKCancelInfoMessageChildWindow.xaml to the project for streamlined confirmation dialogs.

UI Enhancements:

  • Updated rectangle styles in RectangleStyles.xaml to use hex color codes (#f1b856 for orange and #b95353 for red) for better visual consistency. [1] [2] [3] [4] [5] [6]
  • Added a hover effect to rectangle fill in MainWindow.xaml, changing the color to #b95353 when the mouse is over a button.

Validation Improvements:

  • Enhanced profile name validation logic in ProfileFileUniqueValidator to perform case-insensitive comparisons using StringComparison.OrdinalIgnoreCase.

Codebase Refinements:

  • Introduced a new ConsoleTextBlock style in TextBlockStyles.xaml for consistent styling of console-like text elements.
  • Refactored imports in multiple files, including adding necessary namespaces like System.Diagnostics and MahApps.Metro.SimpleChildWindow in ProfileDialogManager. [1] [2]

Miscellaneous:

  • Added a title to the UnlockProfileFile child window in MainWindow.xaml.cs for better clarity.

@BornToBeRoot BornToBeRoot requested a review from Copilot June 23, 2025 23:16
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request migrates profile and group dialogs from the previous Metro dialog mechanism to using simple child windows. Key changes include replacing CustomDialog usage with ChildWindow components in XAML and updating the corresponding view model calls to use Application.Current.MainWindow for dialog hosting, as well as refactoring several asynchronous dialog invocations.

Reviewed Changes

Copilot reviewed 53 out of 54 changed files in this pull request and generated 2 comments.

File Description
ProfileDialogManager.cs Migrates add/edit/copy/delete profile dialogs to use simple child windows instead of CustomDialogs.
Various ViewModels (WhoisHostViewModel, WebConsoleHostViewModel, etc.) Updates all profile dialog invocations to use Application.Current.MainWindow and refactors async calls.
XAML files (e.g. ProfileChildWindow.xaml, MainWindow.xaml) Adjusts layout/styling and binding to support the new simple child windows.

@mergify mergify bot merged commit b7e9ba3 into main Jun 23, 2025
4 checks passed
@mergify mergify bot deleted the feature/profiles_dialog branch June 23, 2025 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant